more test driven development for issues #111 and issue #107