before refactoring sprite class
Sprite class refactored