added reference java code