script field refactor