Adding a function to draw a rectangle.