added a copy to list pop function.