part1 + state pattern