State Pattern improved