update logic on app delegate
update logic on app delegate