updated json serialization