fixed for each days functions