core: make strict shrink code implementation