Stopped converting int to long long; added foldl