implemented most of synchronization code
gsadgas