changed map to 2d vector