fix and working on query