add functions to make queries and general SQL operations