added listener on sort button