Implemented logic from issue #36
Merge pull request #40 from basho/jd-escrit-flow

Implemented logic from issue #36