use popen isntead of call for subprocess