Added select on/off logic
Merge remote-tracking branch 'origin/master'