Unfinished redeem function