minor re-structure of getData subref