Added reset function
merge conflicts