state pattern add