working State Design Pattern example, for use in various projects