add api for switch creation