added variable reduction code
added last_val method and indication of maximum index along reduced axis.
added temporal aggregation to ba, indices correlator