finish first version of tranfer function modeling

Code is now packaged in one function that works quite ok.
still, the interconnection of output ports is not finished.