code to embed signal in BG only input file.
  small changes