Finished the getPurchase method