Refactor work with purchase.
Refactor work with purchase.