implemented preprocessingApplet and everything around it