closes #125 implements shutdown_behavior