function to extract betas from time series regression added