Introduced dynamic parameters to neighborhood arrfunc