implements while chunk

related to Issue #8