cleaned up the altChunk code