changed try catch callback