code to control nikhil switch 2