updated javadocs and comments