replace Popen with call