reducing waiting time per each query