minor tweaks hopefully to improve small perimeters