additional comments, safer exception handling