added conversion to JSON