init using an array. better fit for dp than a map