adding reset() function for issue #5