Basic loop and state running well