new implementation of query parser, moved repositories here