added code to propagate a given error backwards 1 layer