move this operation to separate try-catch block