added applet code