clean up regularization function with using namespace
make it easy to switch between step response and single frequency input