refactoring Sprite component