Added window_size to aggregate and to measure