wrap with Module and Class and some modifications