started function to group time by date - not done