Noise is not invertible
reorganized code
fixed bug