decreasing the query time