wrap module in anonymous function