Added some sales history logic