implemented try catch, broke everything