getting closer to 6D impl
6d is working except for SEGV at the end
add EOL
squash bug; no running valgrind-clean