added remaing comment and javadoc