refactor sale rules