updating logging and adding javadocs