normalize input and don't resort sorted lists.