added toJSON