added try & except KeyError