update register_module function to support loading external modules