refactored to use query class

commented a way of implementing custom setName and filterByName methods