homework school state pattern