added gradient based linear regression