design of the State Pattern, simple example