added exception handle and name parse