Adding mute state and format the code