making reset work with optional param