implementing GSVD