updated switchDetail to manage flows by switch