faster computation of Ginv
Updated test_enc to run for longer