[IMP]sale: improved the code