adding rm_pyc function