for linear reg assignment