all functioning
ver2 of F matrix computation