c functions seems to be correct now
Merge pull request #14 from lolgear/master

c functions seems to be correct now