network layering code fixed