move intro and outro to src, change wait4 function