add a try function