duration is called multiple times in dev, so lets cache it