implemented feedforward propagation and cost function for neural network