sorting done successfully