switch linked to pin