public function get($query, $token = null) {
		if (is_scalar($token)) $token = [$token];
				
		// search for access keys
		$accesskey = null;
		$found = preg_match('=SELECT.+>([a-z_]+).+FROM=is', $query, $match);
		if ($found === 1) {
			$accesskey = $match[1];
			$query = str_replace('>'.$accesskey, $accesskey, $query);
		}
		
		// do query
		$this->connect();
		$sth = $this->prepare($query);
		$returner['SUCCESS'] = $sth->execute($token);
		$returner['RESULT'] = $sth->fetchAll(\PDO::FETCH_ASSOC);
		$returner['NUM_ROWS'] = count($returner['RESULT']);
		
		// if an access key was provided rearrange array
		if (!is_null($accesskey)) {
			$newreturner = [];
			foreach ($returner['RESULT'] as $row) {
				$newreturner[$row[$accesskey]] = $row;
			}
			$returner['RESULT'] = $newreturner;
		}

		return $returner;
	}