state pattern continued