changed array constructor method