port to new api with time and duration