findModule method refactoring