added method get_switch to take one switch at a time