optimization to register module