state pattern corrected!!!!