added some variables to reset()