comments added

to  some functions of xy_switch and xy_switch itself