added javadoc comments to API