added angular functionality to sort table