add factorize method