add networking code from Andrew's factory project (won't compile because uses swing)