working sort button