fixed the bug, but made new one within the factor method.