added preliminary switch apis