adds better stopping criterion
makes the test actually verify function
removes print in test