removed duplicate code / dupilcate method
rewrite query building tests to check also parameters, TODO: complete after implementing issue #6