resolve main as the first in the array if an array is passed