update code to fix bug regarding lis