initial state handling

Added guard for initial state
renamed it to initialState