fixed assignment 2. Instead of using the notify method of condition, I used signal.