change red and green also, initialize digital pin 2 as sound input, added volume update function and history buffer