change popen to accept list of strings; add sh