edited parse_map
parse_map up to date