purchaseFunctions update, ready to test