refractored map initializer