added ability to use params hash to make queries