modified app delegate