refactoring to use QGraphicScene