implemented code for creating a filename when copying