added java part