print and sort costs