adding function for reset