paulkim6 jcheng26: added validation for purchasing