Modified the backup function