more sorting
fixed merge conflict