add sort to the table display so that it dynamically updates