general abstraction, removed hardcoded values, improved plotting, added iterative computation of regression functions depending on lambda