Added toggle switch to the sample