changed closeness function and model