add sort and delete functionality