clean up + unit test regr