making reset a function to call