working version, pre-move to arrays from vectors
move to double arrays from vectors