add extra spotted and closest function