wrote comments and exceptions