added module wrapping to models