begin making shift aggregation function