I think this is a better implementation but I don't remember why...

Whoopsie bad developer!