solved problems with try-catch expressions