updated script using new workflow