javadoc comments

added javadoc comments. First time doing this, hope they're alright