state pattern implemented v.01