updated sort js