updated script for cp