solve surrounded regions