code to find the largest prime factor