updated some java code