main and netwrok