reformat code and fix bugs in sellingPrice.