better use of vars and adding backup of dms content