modified algorithm and matrix generator. Added test vectorsin Bl1