register generate_map in global scope