rework json model functionality