backend work for getting best matching peers