change notify_one to notify_all