taken out as a function

rewrote the part as the insertBackground function.