moving some general functions into a specific files (common.py)