This method should be turned into a free-standing function.

Developer time: minutes