transfered working program code into application-class