Updated the switch case in the genRandAtt function.