corrected javadoc; code formatting