finished weighted search