added totient and prime factorization functions