created a class for the units of the network