added reentrant monitors