TST: remove test_improvement (fails occasionally) replace with more complex function