adding code to do quasi-syncroni