changed string to long long from strtoll to stream