added boilerplate networking code
bug fix