moved several variables to superclass, added running for termination
more debugging