added javadoc and class diagram