refactor
refactor into script files