added assert methods.
updated javadocs.