updated javadoc and style