added noise generation and test