proper implementation of state pattern, uml mod