Waits and synchronization added