improve linear reg efficiency