added javadoc, code is not changed since Corey's last commit