added js sorting algorithms