implementing refund in index