fixed notes, fixed some bugs