added reposync function