modify give function
Merge pull request #259 from irvs/issue255

modify give function