sort by type of sale
fixing test