working prototype of condition chunking