state pattern description added