more compactly written helper @jkeck