began revamping states implementation as it was not really the state pattern before