delete unsused func
make tiny fixes in copyning file funcs