implement chunk class