Improve in_chunk method