adding delay to keep number of queries to min