code modify and add comment