And a nice refactor using a function literal.