update the log and add javadoc