add implementation of network and new test for it