split into 3 files
Merge pull request #6 from trbm/jinpa/reset

split into 3 files