add the condition of putting in child process and getting in parent process.