now i can sort the rectangles and also show the sorted one