changed reset functionality