updating script before refactor