add try/exception catching