added general nlcg
towards euclidean tuple ranges
euclidean ranges seem to work, and to be much faster
using euclidean ranges wherever possible