reduce number of queries to the server