migrate variables array to map