fixed the int types (should be __int64 or long long to accomodate tons of memory allocation)