it is ok to move this right at the top  of the try catch  even before the select statements