adding query executer and some changes