adding the onSw() function