Add simple state pattern example