some common functioanlity which can be used in other mode modules
has been separated to new module 'module_commons.py'