adding some synchronization
some things added