added check in check_if_name_of_agent so see if the name == agent->get_name()