Added State pattern example