significant updates to allow for module wrapper