sort and number transactions