add support for 2D linear reg