print state and enter state work