added hash sort implementation