replaced methods that called linux commands with python functions