state pattern first commit