updated javadoc and testing