fix some bugs, add basic relationship's methods