removed unused code from java file