added improved JSON creator