added prev version of State pattern, not so cool. Improvement need!