added sanitizing method for queries