improved nn and added backprop learning algorithm