Added code for integer factorization