refactoring code and add description for module