refactor the syncVideos function

refactoring