changed network server and client to use functor objects for event handling