more comments and fixed thrown exception