testStability function header