switch to new applet api