added javadoc and annotations