Added restore function.