finished coding basic linear regression functions