added noise creation and filtering code