improve structure and comments