comments and error handling