moved mapdict2array to helpers