changes map to array