restored func