put bg hide in for loop