refactor entry_name and added test