refactor net