initial stab at issue #1, which raises the question of issue #2
allow client to pass in pattern for issue #1 - incomplete.