added search for best result