simplify stream copy