16 state pattern