querying with parameters finished