committing with basic sort and reverse sort done