added parameters to test_stability() method