added synchronization primitives