update some bugs and add organizations api functions