Added wait/notifyAll