still working on converting to the new json code