Implemented condition variables