anchor.diff:  			query = "SELECT count(*) from images i "+endStatement;
   			rset = stmt.executeQuery(query);
   			//out.println(query);
  -			while (rset.next() )
  +			while (rset.next() ){
   				out.println((rset.getObject(1)).toString());
  +				out.println("<br>");
  +			}
   		}
   		else if (subjectSort!=null && ownerSort==null && rangeSort.equals("")){
   			query = "SELECT count(i.photo_id), i.subject from images i "+endStatement + " group by i.subject ";
   			//out.println(query);
   			rset = stmt.executeQuery(query);
  -			while (rset.next() )
  +			while (rset.next() ){
   				out.println("Subject "+modifyPrint(rset.getObject(2))+": "+(rset.getObject(1)).toString());
  +				out.println("<br>");
   				//out.println("<br>");
  -				//out.println("<br>");
  +			}
   
   		}
   		else if (subjectSort==null && ownerSort!=null && rangeSort.equals("")){
   			query = "SELECT count(i.photo_id), i.owner_name from images i "+endStatement + " group by i.owner_name ";
   			//out.println(query);
   			rset = stmt.executeQuery(query);
  -			while (rset.next() )
  +			while (rset.next() ){
   				out.println("Owner "+modifyPrint(rset.getObject(2))+": "+(rset.getObject(1)).toString());
  +				out.println("<br>");
   				//out.println("<br>");
  -				//out.println("<br>");
  -
  +			}
   		}
   		else if (subjectSort!=null && ownerSort!=null && rangeSort.equals("")){
   			query = "SELECT count(i.photo_id), i.owner_name, i.subject from images i "+endStatement + " group by i.owner_name, i.subject ";
   			//out.println(query);
   			rset = stmt.executeQuery(query);
  -			while (rset.next() )
  +			while (rset.next() ){
   				out.println("Owner "+modifyPrint(rset.getObject(2))+" Subject "+modifyPrint(rset.getObject(3))+": "+(rset.getObject(1)).toString());
  +				out.println("<br>");
   				//out.println("<br>");
  -				//out.println("<br>");
  -
  +			}
   		}
   		else if (subjectSort==null && ownerSort==null && !rangeSort.equals("")){
   			//out.println(rangeSort);
  
positive.code: 				query = "SELECT count(i.photo_id), extract(year from i.timing),i.subject from images i "+endStatement + " group by extract(year from i.timing),i.subject ";
  				//out.println(query);
  				rset = stmt.executeQuery(query);
  				while (rset.next() )
  					out.println("Subject "+modifyPrint(rset.getObject(4))+" "+modifyPrint(rset.getObject(2))+": "+(rset.getObject(1)).toString());
  					//out.println("<br>");
  					//out.println("<br>");
  			}
  			else if (rangeSort.equals("month")){
  				query = "SELECT count(i.photo_id), extract(year from i.timing), extract(month from i.timing),i.subject from images i "+endStatement + " group by extract(year from i.timing), extract(month from i.timing),i.subject ";
  				//out.println(query);
  				rset = stmt.executeQuery(query);
  				while (rset.next() )
  					out.println("Subject "+modifyPrint(rset.getObject(4))+" "+modifyPrint(rset.getObject(2))+"-"+modifyPrint(rset.getObject(3))+": "+(rset.getObject(1)).toString());
  					//out.println("<br>");
  					//out.println("<br>");
  			}
  			else {
  				query = "SELECT count(i.photo_id), extract(year from i.timing), extract(month from i.timing), to_char(i.timing,'w'),i.subject from images i "+endStatement + " group by extract(year from i.timing), extract(month from i.timing), to_char(i.timing,'w'),i.subject ";
  				//out.println(query);
  				rset = stmt.executeQuery(query);
  				while (rset.next() )
  					out.println("Subject "+modifyPrint(rset.getObject(5))+" "+modifyPrint(rset.getObject(2))+"-"+modifyPrint(rset.getObject(3))+"(week "+modifyPrint(rset.getObject(4))+"): "+(rset.getObject(1)).toString());
  					//out.println("<br>");
  					//out.println("<br>");
  			}
  
  		}
  
negative.code: 				query = "SELECT count(i.photo_id), extract(year from i.timing), i.owner_name, i.subject from images i "+endStatement + " group by extract(year from i.timing), i.owner_name, i.subject ";
  				//out.println(query);
  				rset = stmt.executeQuery(query);
  				while (rset.next() ){
  					out.println("Subject "+modifyPrint(rset.getObject(4))+" "+"Owner "+modifyPrint(rset.getObject(3))+" "+modifyPrint(rset.getObject(2))+": "+(rset.getObject(1)).toString());
  					out.println("<br>");
  				}
  			}
  			else if (rangeSort.equals("month")){
  				query = "SELECT count(i.photo_id), extract(year from i.timing), extract(month from i.timing), i.owner_name, i.subject from images i "+endStatement + " group by extract(year from i.timing), extract(month from i.timing), i.owner_name, i.subject ";
  				//out.println(query);
  				rset = stmt.executeQuery(query);
  				while (rset.next() ){
  					out.println("Subject "+modifyPrint(rset.getObject(5))+" "+"Owner "+modifyPrint(rset.getObject(4))+" "+modifyPrint(rset.getObject(2))+"-"+modifyPrint(rset.getObject(3))+": "+(rset.getObject(1)).toString());
  					out.println("<br>");
  				}
  			}
  			else {
  				query = "SELECT count(i.photo_id), extract(year from i.timing), extract(month from i.timing), to_char(i.timing,'w'), i.owner_name, i.subject from images i "+endStatement + " group by extract(year from i.timing), extract(month from i.timing), to_char(i.timing,'w'), i.owner_name, i.subject ";
  				//out.println(query);
  				rset = stmt.executeQuery(query);
  				while (rset.next() ){
  					out.println("Subject "+modifyPrint(rset.getObject(6))+" "+"Owner "+modifyPrint(rset.getObject(6))+" "+modifyPrint(rset.getObject(2))+"-"+modifyPrint(rset.getObject(3))+"(week "+modifyPrint(rset.getObject(4))+"): "+(rset.getObject(1)).toString());
  					out.println("<br>");
  				}
  			}
  
  		}
  