function y=wordv(x,z)
%for a word x, this takes a vector and contracts it by that word. For
%example, if your vector is the first boundary point of SG, then this will
%take it to the position of the first boundary point of the F_{x} cell
q=[1/2 1; 0 0; 1 0];
q=q';
s=size(x);
s=s(2);
y=z;
for n=1:1:s
    y=fi(y,[q(1,x(n)+1),q(2,x(n)+1)]);
end