wrote custom AppDelegate and main.m