speed up regression, complete version