use onCode offCode when selecting button