refactoring
add query builder
few more tests