run output is an array now
generalized main