how purchasing works