getting sort and action working