refactor to make get_all_names iteration
remove unneeded require statement