Code review suggested a better solution