much safer implementation. (remove one TMVar which gives a dead lock)