Modified the logic to be generic. logic to enter the text inside the rectangles.