added top and bottom lat pegging for southwest and northeast functions