add viewpurchases script