update the 'gift' source code