added scaling for neural nets.