implemented reset operation