added some java code