implemented parse_query()