draft implementation of resync