shrink function now working