fix bug: not completely factor