added reset feature, all tests passed