adjust the java code for all light