price method for sorting