coerce levels to numbers, allow an object to be passed to sortedKeys
update sorting