current state not working