updating registerModule function