re added java code