add comments and class diagram