remove unnecessary try/catch block in example