implement story merging

closes #137