Added centrality parameter to mex