Added function to draw rectangle.