Reverted earlier change using outer()
Fixed some coefficients