simplified switch in main
modified deleteRand