a bit more refractroing + backup before changing output