adding granger causality time-dependent function