drawShapes moved outside