added documentation (comments, javadoc)