fixed spelling errors. fixed fun. added try/catch