added copying of files first