Coach Ankit is forming a team for the Annual Inter Galactic Relay Race. He has N students that train under him and he knows their strengths. The strength of a student is represented by a positive integer.

The coach has to form a team of K students. The strength of a team is defined by the strength of the weakest student in the team. Now he wants to know the sum of strengths of all the teams of size K that can be formed modulo 1000000007. Please help him.

Input
The first line contains the number of test cases T.
Each case begins with a line containing integers N and K. The next line contains N space-separated numbers which describe the strengths of the students.

Output
For test case output a single integer, the answer as described in the problem statement.

Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 100000
1 ≤ K ≤ N
0 ≤ Strength of each student ≤ 2000000000
Strength of all the students are different.

SAMPLE INPUT
2
2 1
5 4
3 2
1 0 2

SAMPLE OUTPUT
9
1

Explanation

For first test case: 5+4=9, as team can only consist of 1 student.
For second test case: min(1,0) + min(1,2) + min(0,2) = 0+1+0 =1
def power(x,m):
	global mod
	if m==0:
		return 1
	if m&1==0:
		temp=power(x,m/2)%mod
		return (temp*temp)%mod
	return ((x%mod)*power(x,m-1)%mod)%mod
mod=1000000007
t=input()
for kk in range(0,t):
    n,k=(int(i) for i in raw_input().split())
    l=[int(i) for i in raw_input().split()]
    l.sort()
    nCr=[0]*n
    nCr[k-1]=1
    for i in range(0,n):
        if i>=k:
            nCr[i]=(((((i%mod)*(nCr[i-1])%mod))%mod)*(power(i-k+1,mod-2)%mod))%mod
    ans=0
    for i in range(0,n):
        if n-i-1<k-1:
            break
        ans=((ans%mod)+((l[i]%mod)*(nCr[n-i-1]%mod))%mod)%mod
    print long(ans)%mod