fix today function