do some refactor to clean getGiftList function