Issue #192: tweaked implementation...added tests