add complete lin's code