modified to use with run-sequence