condition variables don't work for this :(