code refactor. using textmenu for multiple testing applets