added comments to java file