add try catch block for ascii