Peter is very weak in mathematics. His father gave him a problem and left to work. He is a lazy lad and he wants you to find the solution.

Given a set A which contains elements ranging from 1 to N.Find the sum of the elements in all possible subsets of the given set.

Input Format:

T, the number of test cases.
Following T lines contain N, number of elements in set.

Output Format:

T lines indicating the subset sum. print the answer modulo (109+7).

Constraints: 

1 ≤ T ≤ 1000
1 ≤ N ≤ 2000

SAMPLE INPUT
2
6
3

SAMPLE OUTPUT
672
24
t=int(raw_input())
while t:
	t-=1
	n=int(raw_input())
	print ( pow(2,n-1)*((n*(n+1))/2) )% (10**9+7)