remove broken link in comment
optimize closest method