Tested for first element pivot, testing for last