main program to draw a rectangle