added credit operation
Merge pull request #1 from cxz/credit

added credit operation