added first try catch, more to come
added try catches