added code to save/open neural network