Add an updated Curt's code.
Merge pull request #2 from asenchi/master

Add an updated Curt's code.