sort answer implemented