moved some code from require to getModule, more clear names