fix bug and add notes
remove redundancy line