changed generateRandomArm to assignRandomArm