more work on chunk code