changed redirect script to snuff out invalid classcode