rearranging map keys to prove sort function