second optimize

modulise and add_backup function