minor change
needs comments and checking
honestly - I can't remember what this script does....
vertex wise analysis code