some changes in query