add error checks of queries