added functions to resume or reset