update factorial