cleanup, better chunk mode