added comments on every function, added possibibility for different
connectivities for every population