initial version of code for module2