wrap in try catch block