Created function for largest prime factor