changing to new api call