changed purchase function
idk