clean up write()s
fix merge conflicts
concurrent processes in pipe