implemented reset functionality