working lab 3 minus timer (timer seemed to make getppid behave wrong)