Added drawRectangle function