Changes to make the query faster