Chenged the ideal case and also > to >= in the perimeter_in