refactor script config