added ugly try catch