added prime factors to wed