changed computation of index matrices
fixed typos in guide