The "filter-then-convert" pattern appears in a couple of places...factor out into a method or function?