remove duplication in AppDelegate
remove unnecessary method