Added a variable for whether we want to add noise or not.