move application only code to its own class