added reset function
fix #69 and #72
Merge pull request #73 from loicginoux/master

reset function, fix #69 and #72