Recurssion of rectangles