Writing the module code