don't mutate original array when sorting, rels typo fix