implement reset
Implemented insertRecord and helper methods