success if and function call