change sub process from Popen to call, and added some comments