refactor to match SDK updates