This pattern crops up in a couple of places...extract into a helper or utility method somewhere..?