replace the background variable with the bgImg variable