modified applet code more