parse_chunk function

read chunk method