separated application logic in controller into helper classes