remove duplicate code in toThunk
Merge pull request #116 from island205/master

Remove duplicate code in toThunk