popen concept implementation