efficiency changes. running much faster now, more to come
merging with prior commits