Added more functionality to state 1