Modified back propoagation algorithm