change os.system to subprocess.call