Code to support restoration