simpler sorting key that works