changed app to single app-state