taking mediator name in to the dictionary and some changes in write_type_info function