reverting back to a previous state