working on chunked encoding stuff