utils code for daily.