Created Network version of code