initially app is in foreground