array push rather than iterating into undefined array index.