created purchase prototype