added Javadocs to code