Network finally works!!

Added the test code.