adding module factory for tests
more comments