implementing managed, stateful modules
fixing test bug.  this test is terrible.