refactor sprites to SpriteBase class