reset function is now resetState