Updated background logic