added vars and reset