improved ranking and scope completion