updating for new api