added toggle mute function and exposing muted flag