move queries to model, create class constant and rename method