added button state to register 2