remake of neural network's skeleton