analysis and json i/o working