added try catch, easier transition if runtime crash