done:modify function names todo:change to network order