sorted js version