added variable and for loop for non active hours