update copy and cut function