detection of loop closure