implemented NetworkInterface command to convert NetworkCommand objects into data that can be sent over the network and backwards