made changes to limit switch port code

hopefuly fixed it