update background code