made try-catch al encompassing