now returns dict
now writes json
trying to write without b trigger
working initial version