Refactored code due to https://github.com/Gomasy/update_name/commit/69e2c64b00aa0070b3308744d5ad97fc4743270e