Support main as array