more changes to support chunks