exceptions and comments added