Added neighbors as an argument to comfun's
Corrected initialization to use I as destiation and J as source/via