wiring copy function to view