refactor giftcb