added reset function, though could be prettier lol