How to deal with the problem about copy functions