script to resize CM