missing "end"

Error message: 'end' expected (to close 'function' at line 885) near '<eof>'
Merge pull request #7 from msafwan/patch-1

missing "end"