Add a example and modify the logic