update code and view of check copy function