refactor net module a lot