functioning versions end of day sep 29
trying to make this faster by removing a few dblarrs for positions which I no longer calculate, x5 and x7