add try/catch block