event_to_dict refactor subroutine
include leyning info in JSON API