Loop to test if we are really finding the local min