developed toggle switch with JS event responding to checked vs unchecked