Code modified for already purchased items.