Implementing the chunker