added closeness  detection