put in try catch loop