added shrink code