update swift\'s protocol