bilinear algorithm added, simple tested, not bug-free.