Done. The other code is slightly more efficient, but this looks cleaner.