added rsync logic