fix naming, change object id to dpid
add get switches, create switch function