changed main method to initApp