adding a helper for mod 1000000007 problems