sorting some JS