Added virtual switch logic