added proper network partition code