sort the actions