added n_shift to be declared in main and passed to functors