switching to switch statement
adding ip listing functions