Added State Pattern