if module is a function, create a new instance of it