automated the backup process (to be refactored)