refactor to work with latest api