refactoring sprite sync