now have state base class + bug fixes