few improvements in java but still errors