compute best neighbors list