straighten code for recovery/loading