add max_perimeter