set initial state properly