sprite refactoring