NN code Object orientated