tried to make some changes to the code for anna but this script cannot deal with vector of uneven and unpredictable lengths.  will leave it here for a little while to see if there are other changes that can be made to get the thing to work, but as of now this is a dead branch.