can run, need to sort for each ref row