if any such restriction shall be judged by any court of competent jurisdiction to be void or unenforceable as goind beyond what is reasonable in the circumstances for the protection of the interests of PP would be valid if part of the wording was deleted or the period was reduced or the area dealt with was reduced, the restriction shall apply within jurisdiction of that court with such modifications as may be necessary to make valid and effective