added close function
Merge pull request #5 from rhelmot/master

Added close function