addapted to array values