fold state pattern now works