first version of set condition chunking