refactored to extend pixi classes