Adding reset function