added sending functionality to switches