sync func refactoring done