Defined functions for map_gen_M1()