add comments and UML diagram