create function and about to set perimeters.