[#79107626] Refactor the code