solved the query