Change of query implementation