improve cp.sh and make new clip algorthiem