issue #12 - reviewed implementation and simplified by recording in JSON format instead of ad hoc format