drawing a rectangle by entering its coordinates