converted os.system to subprocess.call