Pre rect change to set
Changed rect to a set, but still sorting to be done. Maybe look into list