correting perpetual generator test
testing find_pivot() and correcting special case bug