separate out querycondition