adds reset method and updates unit tests