update to match new api
update for local mode
merge