Refactor to remove unneeded gotName variable