working on adding purchase function to exams