updated javadoc and modified toString