added synchronization functionality