Adding sort func for real