setting up application state