optimized further to run queries in ~13 sec