Function drawRectangle