refactoring of script
backup before midterm presentation