modified drawShapes()