added while statement to fire off notifyAll's on events