updated check.sync.R function and added documentation to it