implementing gmp module