work on Module factory, Realm constructor