removed unecessary function doquery