chunking and averaging all input