add sort button and logic