tidied up sort actions