puts logic in the right, MVC-appropriate places